---
layout: blogbase
title: Posts
permalink: https://blog.jetbrains.com/ktor/
---

{% assign filtered_posts = site.posts | where_exp:"post", "post.featured == true" %}
{% for post in filtered_posts offset:0 limit:1 %}
<div
        {% if post.image %}
        style="background: url('{{ post.image|relative_url }}'); background-size: cover; background-repeat: no-repeat; background-position: center center; width:100%;"
        {% endif %}
>
    <div class="jumbotron p-3 p-md-5 text-white rounded bg-dark"
         style="background:rgba(0,0,0,0.3) !important;"
    >
        <div class="col-md-12 px-0">
            <h1 class="display-4"><a href="{{ post.url|relative_url }}" style="color:white;">{{ post.title }}</a></h1>
            <div class="mb-1">
                <small>{{ post.date | date: "%Y-%m-%d" }}</small>
            </div>
            <p class="lead my-3">{{ post.excerpt }}</p>
            <p class="lead mb-0"><a href="{{ post.url|relative_url }}" class="text-white btn btn-primary">继续<!--
                -->阅读……</a></p>
        </div>
    </div>
</div>
{% endfor %}

<div class="row mb-2">
    {% assign filtered_posts = site.posts | where_exp:"post", "post.featured == true" %}
    {% for post in filtered_posts offset:1 %}
    <div class="col-md-4">
        <div class="card flex-md-row mb-4 shadow-sm h-md-500">
            <div class="post-card-body card-body d-flex flex-column align-items-start">
                {% if post.image %}
                <a class="text-dark" href="{{ post.url|relative_url }}">
                    <img class="img-fluid" src="{{ post.image|relative_url }}">
                </a>
                {% endif %}
                <div>
                    <h3 class="mb-0 blog-post-title-card" style="padding-bottom:0.3rem;">
                        <a class="text-dark" href="{{ post.url|relative_url }}">{{ post.title }}</a>
                    </h3>
                    <div class="mb-1 blog-post-meta">{{ post.date | date: "%Y-%m-%d" }}</div>
                    <p class="card-text mb-auto">{{ post.excerpt }}</p>
                    <a href="{{ post.url|relative_url }}" class="btn btn-light">继续阅读……</a>
                </div>
            </div>
        </div>
    </div>
    {% endfor %}
</div>
